FROM image.io.local:1.8
ARG PROJECT_NAME
WORKDIR /opt/deployment/
ENV PROJECT_NAME $PROJECT_NAME
COPY spring-boot-helloworld.jar /opt/deployment/
ENV JAVA_OPTS="-Xms2048M \
               -Xmx2048M \
               -XX:+UseParNewGC \
               -XX:+UseConcMarkSweepGC \
               -XX:+UseCMSCompactAtFullCollection \
               -XX:+PrintGCDetails \
               -XX:+PrintGCTimeStamps \
               -Xloggc:logs/gc-%t.log \
               -XX:+HeapDumpOnOutOfMemoryError \
               -XX:HeapDumpPath=./core-dump.hprof"
CMD java ${JAVA_OPTS} -jar /opt/deployment/${PROJECT_NAME}.jar --server.port=80